package org.GenusApis.lib;

import java.io.UnsupportedEncodingException;
import java.util.HashMap;

public class GenusApisUtil {

    public static String calculateOAuthSignature(String httpMethod, String uri, HashMap<String, String> params, String consumerSecret, String oauthTokenSecret) throws UnsupportedEncodingException {
        String normalizedParams = OAuthUtil.normalizeKeyValueParameters(params);
        String baseString = OAuthUtil.generateBaseString(httpMethod, uri, normalizedParams);
        String signature = OAuthUtil.calculateHMACSHA1Signature(baseString, consumerSecret, oauthTokenSecret);
        return signature;
    }
    
}
